package com.xframework.security.api;

import com.xframework.api.BaseRpcService;

import javax.servlet.http.HttpServletRequest;
import java.util.Map;

public interface WxRpcService extends BaseRpcService {
    public String getWxGlobalAccessToken();

    public Map<String, Object> getWxWebAccessToken(HttpServletRequest request);

    public String getWxJsApiTicket();

    public Map<String, Object> getUserInfoByTokenOpenId(String accessToken, String openid);

    public Map<String, String> getWxConfig(String url);

    public void sendWxMessageByUserIds(String openId, String content);

    public void sendWxTemplateMessageByUserIds(String openId, String redirectUrl, String templateId, Map<String, Map<String, String>> data);

    public String sendWxMessageByOpenId(String openId, String content);

    public String sendWxTemplateMessageByOpenId(String openId, String redirectUrl, String templateId, Map<String, Map<String, String>> data);

    public String genRandomCode(String mobile, int length);
}
